local jiumeng_zhanyi = fk.CreateSkill {

  name = "jiumeng_zhanyi",

  tags = { Skill.Limited, },

}



jiumeng_zhanyi:addEffect(fk.EnterDying, {
  name = "jiumeng_zhanyi",
  anim_type = "support",
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(jiumeng_zhanyi.name) and target and target == player and player:usedSkillTimes(jiumeng_zhanyi.name,Player.HistoryGame) == 0 and player.hp < 1
  end,
  on_cost = Util.TrueFunc,
  on_use = function (self, event, target, player, data)
    local room = player.room
    room:handleAddLoseSkills(player,"jiumeng_shenqu")
    room:recover{
      who = player,
      num = 6,
      skillName = jiumeng_zhanyi.name,
      recoverBy = player,
    }
    room:changeShield(player,5)
  end,
})

return jiumeng_zhanyi